package org.codingeasy.streamrecord.examples.expression;

import com.alibaba.fastjson.JSONObject;
import org.codingeasy.streamrecord.springboot.annotation.EnableStreamRecord;
import org.codingeasy.streamrecord.core.CurrentContext;
import org.codingeasy.streamrecord.core.DefaultRecordProducer;
import org.codingeasy.streamrecord.core.RecordProducer;
import org.codingeasy.streamrecord.core.Pipeline;
import org.codingeasy.streamrecord.core.matedata.RecordInfoWrapper;
import org.codingeasy.streamrecord.examples.pojo.User;
import org.codingeasy.streamrecord.examples.service.UserService;
import org.codingeasy.streamrecord.examples.service.impl.UserServiceImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;

import java.util.stream.Collectors;
import org.springframework.context.annotation.Import;

/**
 * 简单的列子
 *
 * @author : KangNing Hu
 */
@Import(Config.class)
@SpringBootApplication
public class SimpleExpressionExample {






  public static void main(String[] args) throws InterruptedException {
    ConfigurableApplicationContext configurableApplicationContext = SpringApplication
        .run(SimpleExpressionExample.class, args);
    UserService userService = configurableApplicationContext.getBean(UserService.class);
    User user = new User();
    user.setName("小玩");
    userService.simple(user);
    Thread.currentThread().join();
    configurableApplicationContext.stop();
  }


}
